<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>makeBlog - Manage Categories</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Matthew Makins' online CV." />
<meta name="keywords" content="Matthew Makins, Matt Makins" />
<link href="templates/mattmakins.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="scripts/ajax_functions.js"></script>
</head>

<body>
<div align="center">
<div id="pageDesign" align="center">

  <div id="banner"></div>
	
  <div id="blogContent">
	<p class="pageHeader">makeBlog - Manage Categories</p><hr /><br />
	<p>You currently have <b>{$numberOfCategories}</b> categories.</p>
	<br />


	<div id="box">
	<form action="manageCategories.php" method="GET">
	<h3>Add a new category</h3>
	<input type="hidden"name="do" value="addCategory">
	<p><br/>Category Name: <input type="text" name="category" /><br/><br/>
	<input type="submit" value="Add Category" />
	</form></p><span class="box-bottom">&nbsp</span>
	</div>
	
	<br />
  <div id="edit">
    <div id="box">
	<h3>Edit Category</h3>
    <form action="manageCategories.php" method="GET">
    <input type="hidden" name="do" value="editCategory" />
    <input type="hidden" name="id" id="edit-id" value="" />
    <p><br/>Name: <input type="text" name="name" id="category-name" /><br/><br/>
    <input type="submit" value="Update" />
    </form></p><span class="box-bottom">&nbsp</span></div>
  </div>


	<div id="currentCategories">
	<h3>Current Blog Categories</h3>
	<ul>
	{foreach from=$categories item=category}
	<li>{$category.title} <a href="manageCategories.php?do=deleteCategory&id={$category.id}">Delete</a> | <span onClick="editCategory({$category.id})">Edit</span></li>
	{/foreach}</ul>
	<span class="box-bottom">&nbsp</span>
	</div>


  </div>
  
  

<!--
  <div class="categoryMenu">
	<ul>
		<li class="categoryHeader"></li>
		{foreach from=$categories item=category}
		<li class="categoryItem">{$category.name}</li>
		{/foreach}
	</ul>
  </div>
-->
  <br/>

  <!-- Footer include -->
  {include file="footer.tpl"}
  
</div>
</div>
</body>
</html>
